package com.zmx.user.repository;

import com.zmx.common.common.repository.BaseRepository;
import com.zmx.user.entity.MemberComments;
import org.springframework.data.jpa.repository.Query;

/**
 * @author zhaomxr
 */
public interface MemberCommentsRepository extends BaseRepository<MemberComments> {

    @Query(value = "SELECT count(1) FROM member_comments where is_vaild = 1 AND member_id = ?1 and TO_DAYS(create_time) = TO_DAYS(NOW())", nativeQuery = true)
    int countByMemberIdToDay(Long memberId);
}
